package com.zwj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zwj.pojo.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface RoleMapper extends BaseMapper<Role> {
    @Select("select r.id,r.name\n" +
            "from sys_role r, sys_role_user s\n" +
            "where\n" +
            "r.id=s.R_id and s.U_id=#{id} ")
    List<Role> findById(Integer id);
}
